3.1127 \(\int x (d+e x^2)^2 (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=115 \[ \frac{\left (d+e x^2\right )^3 \left (a+b \tan ^{-1}(c x)\right )}{6 e}-\frac{b x \left (3 c^4 d^2-3 c^2 d e+e^2\right )}{6 c^5}-\frac{b e x^3 \left (3 c^2 d-e\right )}{18 c^3}-\frac{b \left (c^2 d-e\right )^3 \tan ^{-1}(c x)}{6 c^6 e}-\frac{b e^2 x^5}{30 c} \]

[Out]

-(b*(3*c^4*d^2 - 3*c^2*d*e + e^2)*x)/(6*c^5) - (b*(3*c^2*d - e)*e*x^3)/(18*c^3) - (b*e^2*x^5)/(30*c) - (b*(c^2
*d - e)^3*ArcTan[c*x])/(6*c^6*e) + ((d + e*x^2)^3*(a + b*ArcTan[c*x]))/(6*e)

________________________________________________________________________________________

Rubi [A]  time = 0.113821, antiderivative size = 115, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.158, Rules used = {4974, 390, 203} \[ \frac{\left (d+e x^2\right )^3 \left (a+b \tan ^{-1}(c x)\right )}{6 e}-\frac{b x \left (3 c^4 d^2-3 c^2 d e+e^2\right )}{6 c^5}-\frac{b e x^3 \left (3 c^2 d-e\right )}{18 c^3}-\frac{b \left (c^2 d-e\right )^3 \tan ^{-1}(c x)}{6 c^6 e}-\frac{b e^2 x^5}{30 c} \]

Antiderivative was successfully verified.

[In]

Int[x*(d + e*x^2)^2*(a + b*ArcTan[c*x]),x]

[Out]

-(b*(3*c^4*d^2 - 3*c^2*d*e + e^2)*x)/(6*c^5) - (b*(3*c^2*d - e)*e*x^3)/(18*c^3) - (b*e^2*x^5)/(30*c) - (b*(c^2
*d - e)^3*ArcTan[c*x])/(6*c^6*e) + ((d + e*x^2)^3*(a + b*ArcTan[c*x]))/(6*e)

Rule 4974

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*(x_)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Simp[((d + e*x^2)^(q +
1)*(a + b*ArcTan[c*x]))/(2*e*(q + 1)), x] - Dist[(b*c)/(2*e*(q + 1)), Int[(d + e*x^2)^(q + 1)/(1 + c^2*x^2), x
], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rule 390

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int x \left (d+e x^2\right )^2 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac{\left (d+e x^2\right )^3 \left (a+b \tan ^{-1}(c x)\right )}{6 e}-\frac{(b c) \int \frac{\left (d+e x^2\right )^3}{1+c^2 x^2} \, dx}{6 e}\\ &=\frac{\left (d+e x^2\right )^3 \left (a+b \tan ^{-1}(c x)\right )}{6 e}-\frac{(b c) \int \left (\frac{e \left (3 c^4 d^2-3 c^2 d e+e^2\right )}{c^6}+\frac{\left (3 c^2 d-e\right ) e^2 x^2}{c^4}+\frac{e^3 x^4}{c^2}+\frac{c^6 d^3-3 c^4 d^2 e+3 c^2 d e^2-e^3}{c^6 \left (1+c^2 x^2\right )}\right ) \, dx}{6 e}\\ &=-\frac{b \left (3 c^4 d^2-3 c^2 d e+e^2\right ) x}{6 c^5}-\frac{b \left (3 c^2 d-e\right ) e x^3}{18 c^3}-\frac{b e^2 x^5}{30 c}+\frac{\left (d+e x^2\right )^3 \left (a+b \tan ^{-1}(c x)\right )}{6 e}-\frac{\left (b \left (c^2 d-e\right )^3\right ) \int \frac{1}{1+c^2 x^2} \, dx}{6 c^5 e}\\ &=-\frac{b \left (3 c^4 d^2-3 c^2 d e+e^2\right ) x}{6 c^5}-\frac{b \left (3 c^2 d-e\right ) e x^3}{18 c^3}-\frac{b e^2 x^5}{30 c}-\frac{b \left (c^2 d-e\right )^3 \tan ^{-1}(c x)}{6 c^6 e}+\frac{\left (d+e x^2\right )^3 \left (a+b \tan ^{-1}(c x)\right )}{6 e}\\ \end{align*}

Mathematica [A]  time = 0.0892871, size = 140, normalized size = 1.22 \[ \frac{c x \left (15 a c^5 x \left (3 d^2+3 d e x^2+e^2 x^4\right )-3 b c^4 \left (15 d^2+5 d e x^2+e^2 x^4\right )+5 b c^2 e \left (9 d+e x^2\right )-15 b e^2\right )+15 b \tan ^{-1}(c x) \left (c^6 \left (3 d^2 x^2+3 d e x^4+e^2 x^6\right )+3 c^4 d^2-3 c^2 d e+e^2\right )}{90 c^6} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + e*x^2)^2*(a + b*ArcTan[c*x]),x]

[Out]

(c*x*(-15*b*e^2 + 5*b*c^2*e*(9*d + e*x^2) + 15*a*c^5*x*(3*d^2 + 3*d*e*x^2 + e^2*x^4) - 3*b*c^4*(15*d^2 + 5*d*e
*x^2 + e^2*x^4)) + 15*b*(3*c^4*d^2 - 3*c^2*d*e + e^2 + c^6*(3*d^2*x^2 + 3*d*e*x^4 + e^2*x^6))*ArcTan[c*x])/(90
*c^6)

________________________________________________________________________________________

Maple [A]  time = 0.038, size = 168, normalized size = 1.5 \begin{align*}{\frac{a{e}^{2}{x}^{6}}{6}}+{\frac{aed{x}^{4}}{2}}+{\frac{a{x}^{2}{d}^{2}}{2}}+{\frac{b\arctan \left ( cx \right ){e}^{2}{x}^{6}}{6}}+{\frac{b\arctan \left ( cx \right ) ed{x}^{4}}{2}}+{\frac{b\arctan \left ( cx \right ){d}^{2}{x}^{2}}{2}}-{\frac{b{e}^{2}{x}^{5}}{30\,c}}-{\frac{b{x}^{3}de}{6\,c}}-{\frac{b{d}^{2}x}{2\,c}}+{\frac{b{x}^{3}{e}^{2}}{18\,{c}^{3}}}+{\frac{bedx}{2\,{c}^{3}}}-{\frac{bx{e}^{2}}{6\,{c}^{5}}}+{\frac{b{d}^{2}\arctan \left ( cx \right ) }{2\,{c}^{2}}}-{\frac{b\arctan \left ( cx \right ) ed}{2\,{c}^{4}}}+{\frac{b\arctan \left ( cx \right ){e}^{2}}{6\,{c}^{6}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(e*x^2+d)^2*(a+b*arctan(c*x)),x)

[Out]

1/6*a*e^2*x^6+1/2*a*e*d*x^4+1/2*a*x^2*d^2+1/6*b*arctan(c*x)*e^2*x^6+1/2*b*arctan(c*x)*e*d*x^4+1/2*b*arctan(c*x
)*d^2*x^2-1/30*b*e^2*x^5/c-1/6/c*b*x^3*d*e-1/2*b*d^2*x/c+1/18/c^3*b*x^3*e^2+1/2/c^3*b*e*d*x-1/6/c^5*b*x*e^2+1/
2*b*d^2*arctan(c*x)/c^2-1/2/c^4*b*arctan(c*x)*e*d+1/6/c^6*b*arctan(c*x)*e^2

________________________________________________________________________________________

Maxima [A]  time = 1.44669, size = 211, normalized size = 1.83 \begin{align*} \frac{1}{6} \, a e^{2} x^{6} + \frac{1}{2} \, a d e x^{4} + \frac{1}{2} \, a d^{2} x^{2} + \frac{1}{2} \,{\left (x^{2} \arctan \left (c x\right ) - c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d^{2} + \frac{1}{6} \,{\left (3 \, x^{4} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b d e + \frac{1}{90} \,{\left (15 \, x^{6} \arctan \left (c x\right ) - c{\left (\frac{3 \, c^{4} x^{5} - 5 \, c^{2} x^{3} + 15 \, x}{c^{6}} - \frac{15 \, \arctan \left (c x\right )}{c^{7}}\right )}\right )} b e^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/6*a*e^2*x^6 + 1/2*a*d*e*x^4 + 1/2*a*d^2*x^2 + 1/2*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d^2 + 1/
6*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b*d*e + 1/90*(15*x^6*arctan(c*x) - c*((3*c
^4*x^5 - 5*c^2*x^3 + 15*x)/c^6 - 15*arctan(c*x)/c^7))*b*e^2

________________________________________________________________________________________

Fricas [A]  time = 1.63242, size = 363, normalized size = 3.16 \begin{align*} \frac{15 \, a c^{6} e^{2} x^{6} + 45 \, a c^{6} d e x^{4} - 3 \, b c^{5} e^{2} x^{5} + 45 \, a c^{6} d^{2} x^{2} - 5 \,{\left (3 \, b c^{5} d e - b c^{3} e^{2}\right )} x^{3} - 15 \,{\left (3 \, b c^{5} d^{2} - 3 \, b c^{3} d e + b c e^{2}\right )} x + 15 \,{\left (b c^{6} e^{2} x^{6} + 3 \, b c^{6} d e x^{4} + 3 \, b c^{6} d^{2} x^{2} + 3 \, b c^{4} d^{2} - 3 \, b c^{2} d e + b e^{2}\right )} \arctan \left (c x\right )}{90 \, c^{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/90*(15*a*c^6*e^2*x^6 + 45*a*c^6*d*e*x^4 - 3*b*c^5*e^2*x^5 + 45*a*c^6*d^2*x^2 - 5*(3*b*c^5*d*e - b*c^3*e^2)*x
^3 - 15*(3*b*c^5*d^2 - 3*b*c^3*d*e + b*c*e^2)*x + 15*(b*c^6*e^2*x^6 + 3*b*c^6*d*e*x^4 + 3*b*c^6*d^2*x^2 + 3*b*
c^4*d^2 - 3*b*c^2*d*e + b*e^2)*arctan(c*x))/c^6

________________________________________________________________________________________

Sympy [A]  time = 3.53508, size = 219, normalized size = 1.9 \begin{align*} \begin{cases} \frac{a d^{2} x^{2}}{2} + \frac{a d e x^{4}}{2} + \frac{a e^{2} x^{6}}{6} + \frac{b d^{2} x^{2} \operatorname{atan}{\left (c x \right )}}{2} + \frac{b d e x^{4} \operatorname{atan}{\left (c x \right )}}{2} + \frac{b e^{2} x^{6} \operatorname{atan}{\left (c x \right )}}{6} - \frac{b d^{2} x}{2 c} - \frac{b d e x^{3}}{6 c} - \frac{b e^{2} x^{5}}{30 c} + \frac{b d^{2} \operatorname{atan}{\left (c x \right )}}{2 c^{2}} + \frac{b d e x}{2 c^{3}} + \frac{b e^{2} x^{3}}{18 c^{3}} - \frac{b d e \operatorname{atan}{\left (c x \right )}}{2 c^{4}} - \frac{b e^{2} x}{6 c^{5}} + \frac{b e^{2} \operatorname{atan}{\left (c x \right )}}{6 c^{6}} & \text{for}\: c \neq 0 \\a \left (\frac{d^{2} x^{2}}{2} + \frac{d e x^{4}}{2} + \frac{e^{2} x^{6}}{6}\right ) & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x**2+d)**2*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d**2*x**2/2 + a*d*e*x**4/2 + a*e**2*x**6/6 + b*d**2*x**2*atan(c*x)/2 + b*d*e*x**4*atan(c*x)/2 + b
*e**2*x**6*atan(c*x)/6 - b*d**2*x/(2*c) - b*d*e*x**3/(6*c) - b*e**2*x**5/(30*c) + b*d**2*atan(c*x)/(2*c**2) +
b*d*e*x/(2*c**3) + b*e**2*x**3/(18*c**3) - b*d*e*atan(c*x)/(2*c**4) - b*e**2*x/(6*c**5) + b*e**2*atan(c*x)/(6*
c**6), Ne(c, 0)), (a*(d**2*x**2/2 + d*e*x**4/2 + e**2*x**6/6), True))

________________________________________________________________________________________

Giac [A]  time = 1.26916, size = 281, normalized size = 2.44 \begin{align*} \frac{15 \, b c^{6} x^{6} \arctan \left (c x\right ) e^{2} + 15 \, a c^{6} x^{6} e^{2} + 45 \, b c^{6} d x^{4} \arctan \left (c x\right ) e + 45 \, a c^{6} d x^{4} e + 45 \, b c^{6} d^{2} x^{2} \arctan \left (c x\right ) - 3 \, b c^{5} x^{5} e^{2} + 45 \, a c^{6} d^{2} x^{2} - 15 \, b c^{5} d x^{3} e - 45 \, \pi b c^{4} d^{2} \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 45 \, b c^{5} d^{2} x + 45 \, b c^{4} d^{2} \arctan \left (c x\right ) + 5 \, b c^{3} x^{3} e^{2} + 45 \, b c^{3} d x e - 45 \, b c^{2} d \arctan \left (c x\right ) e - 15 \, \pi b e^{2} \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 15 \, b c x e^{2} + 15 \, b \arctan \left (c x\right ) e^{2}}{90 \, c^{6}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(e*x^2+d)^2*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

1/90*(15*b*c^6*x^6*arctan(c*x)*e^2 + 15*a*c^6*x^6*e^2 + 45*b*c^6*d*x^4*arctan(c*x)*e + 45*a*c^6*d*x^4*e + 45*b
*c^6*d^2*x^2*arctan(c*x) - 3*b*c^5*x^5*e^2 + 45*a*c^6*d^2*x^2 - 15*b*c^5*d*x^3*e - 45*pi*b*c^4*d^2*sgn(c)*sgn(
x) - 45*b*c^5*d^2*x + 45*b*c^4*d^2*arctan(c*x) + 5*b*c^3*x^3*e^2 + 45*b*c^3*d*x*e - 45*b*c^2*d*arctan(c*x)*e -
 15*pi*b*e^2*sgn(c)*sgn(x) - 15*b*c*x*e^2 + 15*b*arctan(c*x)*e^2)/c^6